import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
const {ipcRenderer} = window.require("electron");


import 'element-ui/lib/theme-chalk/index.css';
import ElementUI from 'element-ui'
import './assets/css/global.css'

window.globalEvents = new Vue()

let sendToWs = function (data){
  ipcRenderer.invoke('handleSendMsg', JSON.stringify(data))
}

Vue.use(ElementUI)
Vue.prototype.$sendToWs = sendToWs
Vue.prototype.$ipcInvoke = ipcRenderer.invoke
Vue.config.productionTip = false

const vue = new Vue({
  router,
  store,
  render: function (h) { return h(App) }
}).$mount('#app')

export default vue
